const menuBar = new nw.Menu({ type: 'menubar' });

const fileMenuSub = new nw.Menu();
const quit = new nw.MenuItem({ label: 'Quit', key: 'q', modifiers: 'alt', click: () => nw.App.quit() });
fileMenuSub.append(quit);
const fileMenu = new nw.MenuItem({ label: 'File', key: 'f', modifiers: 'alt', submenu: fileMenuSub });

menuBar.append(fileMenu);

nw.Window.get().menu = menuBar;	